<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>商品管理查看</title>
<script type="text/javascript" src="<%=basePath%>skin/js/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="<%=basePath%>skin/js/common.js"></script>
<script language="javascript">
	 $().ready(function(){
		 <c:forEach items="${product.tags }" var="tag">
		 	var value = "${tag.id}";
		 	$("input:checkbox[name=tagIds]").each(function(){
		 		var tagId = $(this).val();
		 		if(tagId == value){
		 			$(this).attr("checked","true");
		 		}
		 	});
		 </c:forEach>
	 });
</script>
</head>

<body>
	<table width="98%" class="input tabContent">
		<tr bgcolor="#FAFAF1" height="22">
			<td class="tdRight">商品类别：</td>
			<td class="tdLeft">
				${product.productType.type}
			</td>
		</tr>
		<tr bgcolor="#FAFAF1" height="22">
			<td class="tdRight">名称：</td>
			<td class="tdLeft">${product.name}</td>
		</tr>
		<tr bgcolor="#FAFAF1" height="22">
			<td class="tdRight">图片：</td>
			<td class="tdLeft">
				<c:if test="${not empty product.source}">
					<img src="<%=basePath%>download.shtml?filepath=${product.source}" width="80" height="50" title="${product.name}"/>		  			
	  			</c:if>
			</td>
		</tr>
		<tr bgcolor="#FAFAF1" height="22">
			<td class="tdRight">介绍：</td>
			<td class="tdLeft">${product.introduction}</td>
		</tr>
		<tr bgcolor="#FAFAF1" height="22">
			<td class="tdRight">日涨幅：</td>
			<td class="tdLeft">${product.rzf}</td>
		</tr>
		<tr bgcolor="#FAFAF1" height="22">
			<td class="tdRight">月收益：</td>
			<td class="tdLeft">${product.ysy}</td>
		</tr>
		<tr bgcolor="#FAFAF1" height="22">
			<td class="tdRight">发行以来收益：</td>
			<td class="tdLeft">${product.fxylsy}</td>
		</tr>
		<tr bgcolor="#FAFAF1" height="22">
			<td class="tdRight">基金经理：</td>
			<td class="tdLeft">${product.jjjl}</td>
		</tr>
		<tr bgcolor="#FAFAF1" height="22">
			<td class="tdRight">发行公司：</td>
			<td class="tdLeft">${product.fxgs}</td>
		</tr>
		<tr bgcolor="#FAFAF1" height="22">
			<td class="tdRight">发行日期：</td>
			<td class="tdLeft">${product.fxrq}</td>
		</tr>
		<tr bgcolor="#FAFAF1" height="22">
			<td class="tdRight">最近一次调仓日期：</td>
			<td class="tdLeft">${product.zjyctc}</td>
		</tr>
		<tr bgcolor="#FAFAF1" height="22">
			<td class="tdRight">建仓：</td>
			<td class="tdLeft">${product.jc}</td>
		</tr>
		<tr bgcolor="#FAFAF1" height="22">
			<td class="tdRight">基金概况介绍：</td>
			<td class="tdLeft">${product.jjgk}</td>
		</tr>
		<tr bgcolor="#FAFAF1" height="22">
			<td class="tdRight">基金经理介绍：</td>
			<td class="tdLeft">${product.jjjljs}</td>
		</tr>
		<tr bgcolor="#FAFAF1" height="22">
			<td class="tdRight">发行公司介绍：</td>
			<td class="tdLeft">${product.fxgsjs}</td>
		</tr>
		<tr bgcolor="#FAFAF1" height="22">
			<td class="tdRight">是否上架：</td>
			<td class="tdLeft">
				<c:choose>
	  				<c:when test="${product.isMarketable}">是</c:when>
	  				<c:otherwise>否</c:otherwise>
	  			</c:choose>
			</td>
		</tr>
		<tr bgcolor="#FAFAF1" height="22">
			<td class="tdRight">商品标签：</td>
			<td class="tdLeft">
				<c:forEach items="${tags }" var="tag">
					<input type="checkbox" name="tagIds" value="${tag.id }" disabled/> ${tag.name }<br/>
				</c:forEach>
			</td>
		</tr>
	</table>
	<table width="98%">
		<tr bgcolor="#EEF4EA">
			<td height="36" colspan="10">
				<input type="button" value="返回" class="button" onclick="location.href='<%=basePath%>admin/product/list.shtml'" />
			</td>
		</tr>
	</table>
</body>
</html>
